import re

result = re.match(r'a[a-z]*b', 'xaxxxxxxxybxxxxxxxx')
result2 = re.search(r'ab', 'abgggsdafaabgg')
result1 = re.findall(r'a[a-z]*b', 'xaxxxxxxxybxxxxxxxx')

print(result)
print(result1)
print(result2)


